Integrand size = 44, antiderivative size = 664 \[ \int \frac {(a+b \cos (c+d x))^{5/2} \left (B \cos (c+d x)+C \cos ^2(c+d x)\right )}{\sqrt {\cos (c+d x)}} \, dx=-\frac {(a-b) \sqrt {a+b} \left (264 a^2 b B+128 b^3 B+15 a^3 C+284 a b^2 C\right ) \cot (c+d x) E\left (\arcsin \left (\frac {\sqrt {a+b \cos (c+d x)}}{\sqrt {a+b} \sqrt {\cos (c+d x)}}\right )|-\frac {a+b}{a-b}\right ) \sqrt {\frac {a (1-\sec (c+d x))}{a+b}} \sqrt {\frac {a (1+\sec (c+d x))}{a-b}}}{192 a b d}+\frac {\sqrt {a+b} \left (15 a^3 C+8 b^3 (16 B+9 C)+2 a^2 b (132 B+59 C)+4 a b^2 (52 B+71 C)\right ) \cot (c+d x) \operatorname {EllipticF}\left (\arcsin \left (\frac {\sqrt {a+b \cos (c+d x)}}{\sqrt {a+b} \sqrt {\cos (c+d x)}}\right ),-\frac {a+b}{a-b}\right ) \sqrt {\frac {a (1-\sec (c+d x))}{a+b}} \sqrt {\frac {a (1+\sec (c+d x))}{a-b}}}{192 b d}-\frac {\sqrt {a+b} \left (40 a^3 b B+160 a b^3 B-5 a^4 C+120 a^2 b^2 C+48 b^4 C\right ) \cot (c+d x) \operatorname {EllipticPi}\left (\frac {a+b}{b},\arcsin \left (\frac {\sqrt {a+b \cos (c+d x)}}{\sqrt {a+b} \sqrt {\cos (c+d x)}}\right ),-\frac {a+b}{a-b}\right ) \sqrt {\frac {a (1-\sec (c+d x))}{a+b}} \sqrt {\frac {a (1+\sec (c+d x))}{a-b}}}{64 b^2 d}+\frac {\left (264 a^2 b B+128 b^3 B+15 a^3 C+284 a b^2 C\right ) \sqrt {a+b \cos (c+d x)} \sin (c+d x)}{192 b d \sqrt {\cos (c+d x)}}+\frac {\left (24 a b B+5 a^2 C+12 b^2 C\right ) \sqrt {\cos (c+d x)} \sqrt {a+b \cos (c+d x)} \sin (c+d x)}{32 d}+\frac {(8 b B+11 a C) \sqrt {\cos (c+d x)} (a+b \cos (c+d x))^{3/2} \sin (c+d x)}{24 d}+\frac {b C \cos ^{\frac {3}{2}}(c+d x) (a+b \cos (c+d x))^{3/2} \sin (c+d x)}{4 d} \]
[Out]
Time = 2.63 (sec) , antiderivative size = 664, normalized size of antiderivative = 1.00, number of steps used = 10, number of rules used = 9, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.205, Rules used = {3108, 3069, 3128, 3140, 3132, 2888, 3077, 2895, 3073} \[ \int \frac {(a+b \cos (c+d x))^{5/2} \left (B \cos (c+d x)+C \cos ^2(c+d x)\right )}{\sqrt {\cos (c+d x)}} \, dx=\frac {\left (5 a^2 C+24 a b B+12 b^2 C\right ) \sin (c+d x) \sqrt {\cos (c+d x)} \sqrt {a+b \cos (c+d x)}}{32 d}+\frac {\sqrt {a+b} \left (15 a^3 C+2 a^2 b (132 B+59 C)+4 a b^2 (52 B+71 C)+8 b^3 (16 B+9 C)\right ) \cot (c+d x) \sqrt {\frac {a (1-\sec (c+d x))}{a+b}} \sqrt {\frac {a (\sec (c+d x)+1)}{a-b}} \operatorname {EllipticF}\left (\arcsin \left (\frac {\sqrt {a+b \cos (c+d x)}}{\sqrt {a+b} \sqrt {\cos (c+d x)}}\right ),-\frac {a+b}{a-b}\right )}{192 b d}-\frac {(a-b) \sqrt {a+b} \left (15 a^3 C+264 a^2 b B+284 a b^2 C+128 b^3 B\right ) \cot (c+d x) \sqrt {\frac {a (1-\sec (c+d x))}{a+b}} \sqrt {\frac {a (\sec (c+d x)+1)}{a-b}} E\left (\arcsin \left (\frac {\sqrt {a+b \cos (c+d x)}}{\sqrt {a+b} \sqrt {\cos (c+d x)}}\right )|-\frac {a+b}{a-b}\right )}{192 a b d}+\frac {\left (15 a^3 C+264 a^2 b B+284 a b^2 C+128 b^3 B\right ) \sin (c+d x) \sqrt {a+b \cos (c+d x)}}{192 b d \sqrt {\cos (c+d x)}}-\frac {\sqrt {a+b} \left (-5 a^4 C+40 a^3 b B+120 a^2 b^2 C+160 a b^3 B+48 b^4 C\right ) \cot (c+d x) \sqrt {\frac {a (1-\sec (c+d x))}{a+b}} \sqrt {\frac {a (\sec (c+d x)+1)}{a-b}} \operatorname {EllipticPi}\left (\frac {a+b}{b},\arcsin \left (\frac {\sqrt {a+b \cos (c+d x)}}{\sqrt {a+b} \sqrt {\cos (c+d x)}}\right ),-\frac {a+b}{a-b}\right )}{64 b^2 d}+\frac {(11 a C+8 b B) \sin (c+d x) \sqrt {\cos (c+d x)} (a+b \cos (c+d x))^{3/2}}{24 d}+\frac {b C \sin (c+d x) \cos ^{\frac {3}{2}}(c+d x) (a+b \cos (c+d x))^{3/2}}{4 d} \]
[In]
[Out]
Rule 2888
Rule 2895
Rule 3069
Rule 3073
Rule 3077
Rule 3108
Rule 3128
Rule 3132
Rule 3140
Rubi steps \begin{align*} \text {integral}& = \int \sqrt {\cos (c+d x)} (a+b \cos (c+d x))^{5/2} (B+C \cos (c+d x)) \, dx \\ & = \frac {b C \cos ^{\frac {3}{2}}(c+d x) (a+b \cos (c+d x))^{3/2} \sin (c+d x)}{4 d}+\frac {1}{4} \int \sqrt {\cos (c+d x)} \sqrt {a+b \cos (c+d x)} \left (\frac {1}{2} a (8 a B+3 b C)+\left (8 a b B+4 a^2 C+3 b^2 C\right ) \cos (c+d x)+\frac {1}{2} b (8 b B+11 a C) \cos ^2(c+d x)\right ) \, dx \\ & = \frac {(8 b B+11 a C) \sqrt {\cos (c+d x)} (a+b \cos (c+d x))^{3/2} \sin (c+d x)}{24 d}+\frac {b C \cos ^{\frac {3}{2}}(c+d x) (a+b \cos (c+d x))^{3/2} \sin (c+d x)}{4 d}+\frac {\int \frac {\sqrt {a+b \cos (c+d x)} \left (\frac {1}{4} a b (8 b B+11 a C)+\frac {1}{2} b \left (24 a^2 B+16 b^2 B+31 a b C\right ) \cos (c+d x)+\frac {3}{4} b \left (24 a b B+5 a^2 C+12 b^2 C\right ) \cos ^2(c+d x)\right )}{\sqrt {\cos (c+d x)}} \, dx}{12 b} \\ & = \frac {\left (24 a b B+5 a^2 C+12 b^2 C\right ) \sqrt {\cos (c+d x)} \sqrt {a+b \cos (c+d x)} \sin (c+d x)}{32 d}+\frac {(8 b B+11 a C) \sqrt {\cos (c+d x)} (a+b \cos (c+d x))^{3/2} \sin (c+d x)}{24 d}+\frac {b C \cos ^{\frac {3}{2}}(c+d x) (a+b \cos (c+d x))^{3/2} \sin (c+d x)}{4 d}+\frac {\int \frac {\frac {1}{8} a b \left (104 a b B+59 a^2 C+36 b^2 C\right )+\frac {1}{4} b \left (96 a^3 B+152 a b^2 B+161 a^2 b C+36 b^3 C\right ) \cos (c+d x)+\frac {1}{8} b \left (264 a^2 b B+128 b^3 B+15 a^3 C+284 a b^2 C\right ) \cos ^2(c+d x)}{\sqrt {\cos (c+d x)} \sqrt {a+b \cos (c+d x)}} \, dx}{24 b} \\ & = \frac {\left (264 a^2 b B+128 b^3 B+15 a^3 C+284 a b^2 C\right ) \sqrt {a+b \cos (c+d x)} \sin (c+d x)}{192 b d \sqrt {\cos (c+d x)}}+\frac {\left (24 a b B+5 a^2 C+12 b^2 C\right ) \sqrt {\cos (c+d x)} \sqrt {a+b \cos (c+d x)} \sin (c+d x)}{32 d}+\frac {(8 b B+11 a C) \sqrt {\cos (c+d x)} (a+b \cos (c+d x))^{3/2} \sin (c+d x)}{24 d}+\frac {b C \cos ^{\frac {3}{2}}(c+d x) (a+b \cos (c+d x))^{3/2} \sin (c+d x)}{4 d}+\frac {\int \frac {-\frac {1}{8} a b \left (264 a^2 b B+128 b^3 B+15 a^3 C+284 a b^2 C\right )+\frac {1}{4} a b^2 \left (104 a b B+59 a^2 C+36 b^2 C\right ) \cos (c+d x)+\frac {3}{8} b \left (40 a^3 b B+160 a b^3 B-5 a^4 C+120 a^2 b^2 C+48 b^4 C\right ) \cos ^2(c+d x)}{\cos ^{\frac {3}{2}}(c+d x) \sqrt {a+b \cos (c+d x)}} \, dx}{48 b^2} \\ & = \frac {\left (264 a^2 b B+128 b^3 B+15 a^3 C+284 a b^2 C\right ) \sqrt {a+b \cos (c+d x)} \sin (c+d x)}{192 b d \sqrt {\cos (c+d x)}}+\frac {\left (24 a b B+5 a^2 C+12 b^2 C\right ) \sqrt {\cos (c+d x)} \sqrt {a+b \cos (c+d x)} \sin (c+d x)}{32 d}+\frac {(8 b B+11 a C) \sqrt {\cos (c+d x)} (a+b \cos (c+d x))^{3/2} \sin (c+d x)}{24 d}+\frac {b C \cos ^{\frac {3}{2}}(c+d x) (a+b \cos (c+d x))^{3/2} \sin (c+d x)}{4 d}+\frac {\int \frac {-\frac {1}{8} a b \left (264 a^2 b B+128 b^3 B+15 a^3 C+284 a b^2 C\right )+\frac {1}{4} a b^2 \left (104 a b B+59 a^2 C+36 b^2 C\right ) \cos (c+d x)}{\cos ^{\frac {3}{2}}(c+d x) \sqrt {a+b \cos (c+d x)}} \, dx}{48 b^2}+\frac {\left (40 a^3 b B+160 a b^3 B-5 a^4 C+120 a^2 b^2 C+48 b^4 C\right ) \int \frac {\sqrt {\cos (c+d x)}}{\sqrt {a+b \cos (c+d x)}} \, dx}{128 b} \\ & = -\frac {\sqrt {a+b} \left (40 a^3 b B+160 a b^3 B-5 a^4 C+120 a^2 b^2 C+48 b^4 C\right ) \cot (c+d x) \operatorname {EllipticPi}\left (\frac {a+b}{b},\arcsin \left (\frac {\sqrt {a+b \cos (c+d x)}}{\sqrt {a+b} \sqrt {\cos (c+d x)}}\right ),-\frac {a+b}{a-b}\right ) \sqrt {\frac {a (1-\sec (c+d x))}{a+b}} \sqrt {\frac {a (1+\sec (c+d x))}{a-b}}}{64 b^2 d}+\frac {\left (264 a^2 b B+128 b^3 B+15 a^3 C+284 a b^2 C\right ) \sqrt {a+b \cos (c+d x)} \sin (c+d x)}{192 b d \sqrt {\cos (c+d x)}}+\frac {\left (24 a b B+5 a^2 C+12 b^2 C\right ) \sqrt {\cos (c+d x)} \sqrt {a+b \cos (c+d x)} \sin (c+d x)}{32 d}+\frac {(8 b B+11 a C) \sqrt {\cos (c+d x)} (a+b \cos (c+d x))^{3/2} \sin (c+d x)}{24 d}+\frac {b C \cos ^{\frac {3}{2}}(c+d x) (a+b \cos (c+d x))^{3/2} \sin (c+d x)}{4 d}-\frac {\left (a \left (264 a^2 b B+128 b^3 B+15 a^3 C+284 a b^2 C\right )\right ) \int \frac {1+\cos (c+d x)}{\cos ^{\frac {3}{2}}(c+d x) \sqrt {a+b \cos (c+d x)}} \, dx}{384 b}+\frac {\left (a \left (15 a^3 C+8 b^3 (16 B+9 C)+2 a^2 b (132 B+59 C)+4 a b^2 (52 B+71 C)\right )\right ) \int \frac {1}{\sqrt {\cos (c+d x)} \sqrt {a+b \cos (c+d x)}} \, dx}{384 b} \\ & = -\frac {(a-b) \sqrt {a+b} \left (264 a^2 b B+128 b^3 B+15 a^3 C+284 a b^2 C\right ) \cot (c+d x) E\left (\arcsin \left (\frac {\sqrt {a+b \cos (c+d x)}}{\sqrt {a+b} \sqrt {\cos (c+d x)}}\right )|-\frac {a+b}{a-b}\right ) \sqrt {\frac {a (1-\sec (c+d x))}{a+b}} \sqrt {\frac {a (1+\sec (c+d x))}{a-b}}}{192 a b d}+\frac {\sqrt {a+b} \left (15 a^3 C+8 b^3 (16 B+9 C)+2 a^2 b (132 B+59 C)+4 a b^2 (52 B+71 C)\right ) \cot (c+d x) \operatorname {EllipticF}\left (\arcsin \left (\frac {\sqrt {a+b \cos (c+d x)}}{\sqrt {a+b} \sqrt {\cos (c+d x)}}\right ),-\frac {a+b}{a-b}\right ) \sqrt {\frac {a (1-\sec (c+d x))}{a+b}} \sqrt {\frac {a (1+\sec (c+d x))}{a-b}}}{192 b d}-\frac {\sqrt {a+b} \left (40 a^3 b B+160 a b^3 B-5 a^4 C+120 a^2 b^2 C+48 b^4 C\right ) \cot (c+d x) \operatorname {EllipticPi}\left (\frac {a+b}{b},\arcsin \left (\frac {\sqrt {a+b \cos (c+d x)}}{\sqrt {a+b} \sqrt {\cos (c+d x)}}\right ),-\frac {a+b}{a-b}\right ) \sqrt {\frac {a (1-\sec (c+d x))}{a+b}} \sqrt {\frac {a (1+\sec (c+d x))}{a-b}}}{64 b^2 d}+\frac {\left (264 a^2 b B+128 b^3 B+15 a^3 C+284 a b^2 C\right ) \sqrt {a+b \cos (c+d x)} \sin (c+d x)}{192 b d \sqrt {\cos (c+d x)}}+\frac {\left (24 a b B+5 a^2 C+12 b^2 C\right ) \sqrt {\cos (c+d x)} \sqrt {a+b \cos (c+d x)} \sin (c+d x)}{32 d}+\frac {(8 b B+11 a C) \sqrt {\cos (c+d x)} (a+b \cos (c+d x))^{3/2} \sin (c+d x)}{24 d}+\frac {b C \cos ^{\frac {3}{2}}(c+d x) (a+b \cos (c+d x))^{3/2} \sin (c+d x)}{4 d} \\ \end{align*}
Result contains complex when optimal does not.
Time = 7.74 (sec) , antiderivative size = 1287, normalized size of antiderivative = 1.94 \[ \int \frac {(a+b \cos (c+d x))^{5/2} \left (B \cos (c+d x)+C \cos ^2(c+d x)\right )}{\sqrt {\cos (c+d x)}} \, dx=\frac {-\frac {4 a \left (472 a^2 b B+128 b^3 B+133 a^3 C+356 a b^2 C\right ) \sqrt {\frac {(a+b) \cot ^2\left (\frac {1}{2} (c+d x)\right )}{-a+b}} \sqrt {-\frac {(a+b) \cos (c+d x) \csc ^2\left (\frac {1}{2} (c+d x)\right )}{a}} \sqrt {\frac {(a+b \cos (c+d x)) \csc ^2\left (\frac {1}{2} (c+d x)\right )}{a}} \csc (c+d x) \operatorname {EllipticF}\left (\arcsin \left (\frac {\sqrt {\frac {(a+b \cos (c+d x)) \csc ^2\left (\frac {1}{2} (c+d x)\right )}{a}}}{\sqrt {2}}\right ),-\frac {2 a}{-a+b}\right ) \sin ^4\left (\frac {1}{2} (c+d x)\right )}{(a+b) \sqrt {\cos (c+d x)} \sqrt {a+b \cos (c+d x)}}-4 a \left (384 a^3 B+608 a b^2 B+644 a^2 b C+144 b^3 C\right ) \left (\frac {\sqrt {\frac {(a+b) \cot ^2\left (\frac {1}{2} (c+d x)\right )}{-a+b}} \sqrt {-\frac {(a+b) \cos (c+d x) \csc ^2\left (\frac {1}{2} (c+d x)\right )}{a}} \sqrt {\frac {(a+b \cos (c+d x)) \csc ^2\left (\frac {1}{2} (c+d x)\right )}{a}} \csc (c+d x) \operatorname {EllipticF}\left (\arcsin \left (\frac {\sqrt {\frac {(a+b \cos (c+d x)) \csc ^2\left (\frac {1}{2} (c+d x)\right )}{a}}}{\sqrt {2}}\right ),-\frac {2 a}{-a+b}\right ) \sin ^4\left (\frac {1}{2} (c+d x)\right )}{(a+b) \sqrt {\cos (c+d x)} \sqrt {a+b \cos (c+d x)}}-\frac {\sqrt {\frac {(a+b) \cot ^2\left (\frac {1}{2} (c+d x)\right )}{-a+b}} \sqrt {-\frac {(a+b) \cos (c+d x) \csc ^2\left (\frac {1}{2} (c+d x)\right )}{a}} \sqrt {\frac {(a+b \cos (c+d x)) \csc ^2\left (\frac {1}{2} (c+d x)\right )}{a}} \csc (c+d x) \operatorname {EllipticPi}\left (-\frac {a}{b},\arcsin \left (\frac {\sqrt {\frac {(a+b \cos (c+d x)) \csc ^2\left (\frac {1}{2} (c+d x)\right )}{a}}}{\sqrt {2}}\right ),-\frac {2 a}{-a+b}\right ) \sin ^4\left (\frac {1}{2} (c+d x)\right )}{b \sqrt {\cos (c+d x)} \sqrt {a+b \cos (c+d x)}}\right )+2 \left (264 a^2 b B+128 b^3 B+15 a^3 C+284 a b^2 C\right ) \left (\frac {i \cos \left (\frac {1}{2} (c+d x)\right ) \sqrt {a+b \cos (c+d x)} E\left (i \text {arcsinh}\left (\frac {\sin \left (\frac {1}{2} (c+d x)\right )}{\sqrt {\cos (c+d x)}}\right )|-\frac {2 a}{-a-b}\right ) \sec (c+d x)}{b \sqrt {\cos ^2\left (\frac {1}{2} (c+d x)\right ) \sec (c+d x)} \sqrt {\frac {(a+b \cos (c+d x)) \sec (c+d x)}{a+b}}}+\frac {2 a \left (\frac {a \sqrt {\frac {(a+b) \cot ^2\left (\frac {1}{2} (c+d x)\right )}{-a+b}} \sqrt {-\frac {(a+b) \cos (c+d x) \csc ^2\left (\frac {1}{2} (c+d x)\right )}{a}} \sqrt {\frac {(a+b \cos (c+d x)) \csc ^2\left (\frac {1}{2} (c+d x)\right )}{a}} \csc (c+d x) \operatorname {EllipticF}\left (\arcsin \left (\frac {\sqrt {\frac {(a+b \cos (c+d x)) \csc ^2\left (\frac {1}{2} (c+d x)\right )}{a}}}{\sqrt {2}}\right ),-\frac {2 a}{-a+b}\right ) \sin ^4\left (\frac {1}{2} (c+d x)\right )}{(a+b) \sqrt {\cos (c+d x)} \sqrt {a+b \cos (c+d x)}}-\frac {a \sqrt {\frac {(a+b) \cot ^2\left (\frac {1}{2} (c+d x)\right )}{-a+b}} \sqrt {-\frac {(a+b) \cos (c+d x) \csc ^2\left (\frac {1}{2} (c+d x)\right )}{a}} \sqrt {\frac {(a+b \cos (c+d x)) \csc ^2\left (\frac {1}{2} (c+d x)\right )}{a}} \csc (c+d x) \operatorname {EllipticPi}\left (-\frac {a}{b},\arcsin \left (\frac {\sqrt {\frac {(a+b \cos (c+d x)) \csc ^2\left (\frac {1}{2} (c+d x)\right )}{a}}}{\sqrt {2}}\right ),-\frac {2 a}{-a+b}\right ) \sin ^4\left (\frac {1}{2} (c+d x)\right )}{b \sqrt {\cos (c+d x)} \sqrt {a+b \cos (c+d x)}}\right )}{b}+\frac {\sqrt {a+b \cos (c+d x)} \sin (c+d x)}{b \sqrt {\cos (c+d x)}}\right )}{384 d}+\frac {\sqrt {\cos (c+d x)} \sqrt {a+b \cos (c+d x)} \left (\frac {1}{96} \left (104 a b B+59 a^2 C+42 b^2 C\right ) \sin (c+d x)+\frac {1}{48} b (8 b B+17 a C) \sin (2 (c+d x))+\frac {1}{16} b^2 C \sin (3 (c+d x))\right )}{d} \]
[In]
[Out]
Leaf count of result is larger than twice the leaf count of optimal. \(5790\) vs. \(2(610)=1220\).
Time = 2.78 (sec) , antiderivative size = 5791, normalized size of antiderivative = 8.72
method | result | size |
parts | \(\text {Expression too large to display}\) | \(5791\) |
default | \(\text {Expression too large to display}\) | \(5861\) |
[In]
[Out]
\[ \int \frac {(a+b \cos (c+d x))^{5/2} \left (B \cos (c+d x)+C \cos ^2(c+d x)\right )}{\sqrt {\cos (c+d x)}} \, dx=\int { \frac {{\left (C \cos \left (d x + c\right )^{2} + B \cos \left (d x + c\right )\right )} {\left (b \cos \left (d x + c\right ) + a\right )}^{\frac {5}{2}}}{\sqrt {\cos \left (d x + c\right )}} \,d x } \]
[In]
[Out]
Timed out. \[ \int \frac {(a+b \cos (c+d x))^{5/2} \left (B \cos (c+d x)+C \cos ^2(c+d x)\right )}{\sqrt {\cos (c+d x)}} \, dx=\text {Timed out} \]
[In]
[Out]
\[ \int \frac {(a+b \cos (c+d x))^{5/2} \left (B \cos (c+d x)+C \cos ^2(c+d x)\right )}{\sqrt {\cos (c+d x)}} \, dx=\int { \frac {{\left (C \cos \left (d x + c\right )^{2} + B \cos \left (d x + c\right )\right )} {\left (b \cos \left (d x + c\right ) + a\right )}^{\frac {5}{2}}}{\sqrt {\cos \left (d x + c\right )}} \,d x } \]
[In]
[Out]
\[ \int \frac {(a+b \cos (c+d x))^{5/2} \left (B \cos (c+d x)+C \cos ^2(c+d x)\right )}{\sqrt {\cos (c+d x)}} \, dx=\int { \frac {{\left (C \cos \left (d x + c\right )^{2} + B \cos \left (d x + c\right )\right )} {\left (b \cos \left (d x + c\right ) + a\right )}^{\frac {5}{2}}}{\sqrt {\cos \left (d x + c\right )}} \,d x } \]
[In]
[Out]
Timed out. \[ \int \frac {(a+b \cos (c+d x))^{5/2} \left (B \cos (c+d x)+C \cos ^2(c+d x)\right )}{\sqrt {\cos (c+d x)}} \, dx=\int \frac {\left (C\,{\cos \left (c+d\,x\right )}^2+B\,\cos \left (c+d\,x\right )\right )\,{\left (a+b\,\cos \left (c+d\,x\right )\right )}^{5/2}}{\sqrt {\cos \left (c+d\,x\right )}} \,d x \]
[In]
[Out]